/**
 * (created at 2011-1-21)
 */
package qiushuo.mysqlparser.ast.expression.primary;

import qiushuo.mysqlparser.generator.SQLType;

/**
 * @author <a href="mailto:QiuShuo1985@gmail.com">QIU Shuo</a>
 */
public class UsrDefVarPrimary extends PrimaryExpression {
    /** include starting '@' */
    private String varText;

    public UsrDefVarPrimary(String varText) {
        this.varText = varText;
    }

    @Override
    public String generateSql(SQLType type) {
        switch (type) {
        case MySQL:
            return varText;
        default:
            throw new UnsupportedOperationException("only mysql sql can be generated");
        }
    }
}
